﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Xml.Serialization;

namespace ProjectWizardManagement.Entity.Model
{
    [NotMapped]
    public partial class Project
    {    
        public Project()
        {
            Tasks = new List<Task>();
            CalendarEvents = new List<CalendarEvent>();
            CurrentVersionFiles = new List<ProjectFile>();
        }                                                                                           
        #region Properties

        [XmlAttribute("Id")]
        public int Id { get; set; }

        [XmlAttribute("Name")]
        public String Name { get; set; }

        [XmlElement("Description")]
        public String Description { get; set; }

        [XmlElement("CurrentVersion")]
        public int CurrentVersion { get; set; }

        [XmlElement("Directory")]
        public String ProjectDirectory { get; set; }
        
        [XmlArray("Tasks"), XmlArrayItem("Task", typeof(Task))]
        public List<Task> Tasks { get; set; }

        [XmlArray("CalendarEvents"), XmlArrayItem("CalendarEvent", typeof(CalendarEvent))]
        public List<CalendarEvent> CalendarEvents { get; set; }

        [XmlArray("CurrentVersionFiles"), XmlArrayItem("ProjectFile", typeof(ProjectFile))]
        public List<ProjectFile> CurrentVersionFiles { get; set; } 
        #endregion
    }
}
